import request from './request.js'

const Map_Key = '67e5bef425ffa80bbb6203a109d25f8f'

// IP接口
export const getIPData = () => {
  return request({
    method: 'GET',
    url: '/ip',
    params: {
      key: Map_Key,
      // ip:'',可选项ip,不设置则获取当前地区
    },
  })
}

// City接口
export const getCityData = (address) => {
  return request({
    method: 'GET',
    url: '/geocode/geo',
    params: {
      key: Map_Key,
      address: address,
    },
  })
}

// Weather接口
export const getWeatherData = (adcode, extension) => {
  return request({
    method: 'GET',
    url: '/weather/weatherInfo',
    params: {
      key: Map_Key,
      city: adcode,
      extensions: extension,
    },
  })
}
